package com.lysj.admin.master.bussiness.admin.controller;

import com.lysj.admin.master.bussiness.admin.domain.ServiceProvider;
import com.lysj.admin.master.bussiness.admin.mapper.ServiceProviderMapper;
import com.lysj.admin.master.bussiness.admin.service.ServiceProviderService;
import com.lysj.admin.master.common.annotation.MyList;
import com.lysj.admin.master.common.spring.mpbase.MyController;
import com.lysj.admin.master.common.spring.mpbase.MyService;
import com.lysj.admin.master.common.spring.pagination.PageRequestDTO;
import com.lysj.admin.master.common.web.Resp;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author Created by drj on 2020-01-02 22:46
 * @description
 */
@Slf4j
@RestController
@RequestMapping("/admin/service_provider")
public class ServiceProviderController extends MyController<ServiceProviderMapper, ServiceProvider, PageRequestDTO> {

    @Resource
    private ServiceProviderService serviceProviderService;


    @Override
    public MyService<ServiceProviderMapper, ServiceProvider> getService() {
        return serviceProviderService;
    }

    @Override
    @MyList
    public Resp list(PageRequestDTO condition) {
        return super.list(condition);
    }

    @PostMapping("/save")
    @Override
    public Resp save(ServiceProvider entity) {
        return super.save(entity);
    }

    @PostMapping("/update")
    @Override
    public Resp update(ServiceProvider entity) {
        return super.update(entity);
    }


}
